package bma.common.netty.handler;

import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;

public abstract class CHannelHandlerProxy<PTYPE> extends
		SimpleChannelUpstreamHandler {
	
	PTYPE proxyChannel;

	@Override
	public void channelDisconnected(ChannelHandlerContext ctx,
			ChannelStateEvent e) throws Exception {
		super.channelDisconnected(ctx, e);
	}

	@Override
	public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
			throws Exception {
		if(isProxyMessage(e.getChannel(), e.getMessage())) {
			
		}
		super.messageReceived(ctx, e);
	}

	public boolean isProxyMessage(Channel ch, Object msg) {
		return true;
	}
}
